package com.nkzy.config;

import com.nkzy.servlet.ThirdServlet;
import org.springframework.boot.web.servlet.ServletRegistrationBean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * Create by 王建烨 on 2022/4/1 11:28
 **/

@Configuration
public class ServletConfig {

    @Bean
    public ServletRegistrationBean getServlet() {
        ServletRegistrationBean bean = new ServletRegistrationBean(new ThirdServlet());
        bean.addUrlMappings("/thirdServlet");
        return bean;
    }
}
